package org.hishenframework.core.security;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
//import org.guide.service.admin.friendlink.FriendLinkService;

/**
 *拦截器模板 
 * @author liuwei
 *
 */
public class DemoInterceptor extends HandlerInterceptorAdapter {

//	@Resource
//	private FriendLinkService linkService;
////	 private Logger log = Logger.getLogger(FriendLinkInterceptor.class);
//	 
//	public FriendLinkInterceptor(){
//		
//	}
	

//	private String mappingURL;//利用正则映射到需要拦截的路径    
//    public void setMappingURL(String mappingURL) {    
//           this.mappingURL = mappingURL;    
//   }
//    ==============执行顺序: 3、afterCompletion================
	@Override
	public void afterCompletion(HttpServletRequest arg0,
			HttpServletResponse arg1, Object arg2, Exception arg3)
			throws Exception {
	}
//	==============执行顺序: 2、postHandle================
	@Override
	public void postHandle(HttpServletRequest arg0, HttpServletResponse arg1,
			Object arg2, ModelAndView arg3) throws Exception {
//		arg0.setAttribute("friendLinks", linkService.searchForShow());
	}
//	==============执行顺序: 1、preHandle================
	@Override
	public boolean preHandle(HttpServletRequest arg0, HttpServletResponse arg1,
			Object arg2) throws Exception {
		return true;
	}   



	
}
